Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make data-vaul-no-drag work if any parent matches #267

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

arsaizdihar
Copy link
Contributor

Currently, data-vaul-no-drag only worked if the dragged element is exactly the element that has the attribute. The expected behavior is it works if any of the parent (using element.closest) has the attribute. Fixes #266

Copy link

vercel bot commented Feb 11, 2024

@arsaizdihar is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.

@emilkowalski emilkowalski merged commit b7d7640 into emilkowalski:main Feb 11, 2024
1 check failed
@Poylar
Copy link

Poylar commented Apr 9, 2024

this still not working with Inputs fields

@kyesildagli
Copy link

Can someone please provide an example on how to use this attribute

@arsaizdihar
Copy link
Contributor Author

Can someone please provide an example on how to use this attribute

You just need to add attribute data-vaul-no-drag to any element in the drawer and any drag on that element (and every children of it, recursively) wont move the drawer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to create an undraggable drawer
4 participants